package com.zyy.ui.policy.dto;

import com.zyy.ui.annotations.ListNotEmpty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @ClassName: PolicyDTO
 * @Description: 投保DTO
 * @Author: zyy
 * @Date: 2020/04/25 18:36
 * @Version: 1.0
 */
@Data
@ApiModel("投保入参")
public class PolicyDTO implements Serializable {
    @Size
    @ApiModelProperty(value = "合作伙伴编码")
    @NotBlank(message = "partnerCode不可为空")
    private String partnerCode;
    @ApiModelProperty(value = "流水号")
    @NotBlank(message = "serialNo不可为空")
    private String serialNo;
    @ApiModelProperty(value = "基本信息")
    @Valid
    @NotNull(message = "baseInfo不可为空")
    private BaseInfoDTO baseInfo;
    @ApiModelProperty(value = "投保人List")
    @Valid
    @ListNotEmpty(message = "applicantList不可为空")
    private List<ApplicantDTO> applicantList;
    @ApiModelProperty(value = "被保人List")
    private List<InsuranceDTO> insuranceList;
}
